#!/usr/bin/python
# -*- coding: UTF-8 -*-
#带参数的装饰器
def dec2_para(country):
    def dec2_outer(func):
        def dec2_inner(*args, **kwargs):
            if country == '中国':
                print('你好!')
            elif country == 'America':
                print('Hello!')
            else:
                print('Where are you from?')
            # 函数真正执行的地方
            func(*args, **kwargs)
        return dec2_inner
    return dec2_outer

@dec2_para('中国')
def Chinese():
    print('中国')

@dec2_para('America')
def American():
    print('America')

Chinese()
print('-'*30)
American()